package com.dp.vo;

import java.io.Serializable;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name = "t_hdtags")
public class THdTags implements Serializable {
	    private static final long serialVersionUID = 1L;
	    @Id
	    @GeneratedValue(strategy = GenerationType.IDENTITY)
	    @Basic(optional = false)
	    @Column(name = "tid")
	    private Integer tid;
	    @Column(name = "tagname")
	    private String tagname;
	    @JoinColumn(name = "channelid", referencedColumnName = "channel_id")
	    @ManyToOne
	    private TChannels channel;
	    
	    public THdTags(){
	    	
	    }
	    public THdTags(Integer tid){
	    	this.tid=tid;
	    }
	    
		public Integer getTid() {
			return tid;
		}

		public void setTid(Integer tid) {
			this.tid = tid;
		}

		public String getTagname() {
			return tagname;
		}

		public void setTagname(String tagname) {
			this.tagname = tagname;
		}

		public TChannels getChannel() {
			return channel;
		}

		public void setChannel(TChannels channel) {
			this.channel = channel;
		}

		@Override
	    public int hashCode() {
	        int hash = 0;
	        hash += (tid != null ? tid.hashCode() : 0);
	        return hash;
	    }

	    @Override
	    public boolean equals(Object object) {
	        if (!(object instanceof THdTags)) {
	            return false;
	        }
	        THdTags other = (THdTags) object;
	        if ((this.tid == null && other.tid != null) || (this.tid != null && !this.tid.equals(other.tid))) {
	            return false;
	        }
	        return true;
	    }

	    @Override
	    public String toString() {
	        return "com.dp.vo.THdTags[tid=" + tid + "]";
	    }
}
